<template>
  <f7-page>
    <f7-navbar title="收益明细" back-link="返回"></f7-navbar>
    <template v-if="list.length > 0">
      <f7-row class="table-title">
        <f7-col width="20"><span class="text-shadow">金额</span></f7-col>
        <f7-col width="30"><span class="text-shadow">时间</span></f7-col>
        <f7-col width="50"><span class="text-shadow">内容</span></f7-col>
      </f7-row>
      <f7-row class="table-title" v-for="(item, index) in list" :key="index">
        <f7-col width="20">{{item.money}}</f7-col>
        <f7-col width="30">{{$moment(item.add_time * 1000).format('YYYY-MM-DD')}}</f7-col>
        <f7-col width="50">{{item.content}}</f7-col>
      </f7-row>
    </template>

    <no-content-tips v-else></no-content-tips>
  </f7-page>
</template>

<script>
  import { staticList } from "../api/position";

  export default {
    name: "revenue-breakdown",
    data() {
      return {
        list: []
      }
    },
    mounted() {
      this.init();
    },
    methods: {
      init() {
        staticList().then(res => {
          this.list =res.data;
        })
      }
    }
  }
</script>

<style scoped lang="scss">
  .table-title {
    text-align: center;
  }
</style>